﻿using System;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.ComponentModel;
using DPFP;
using DPFP.Capture;
using RemObjects.SDK;
using RemObjects.SDK.Server;

namespace FingerReader
{
    public partial class MainForm : System.Windows.Forms.Form, DPFP.Capture.EventHandler
    {
        private Capture _capture;
        public MainForm()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
            _capture = new Capture();
            _capture.EventHandler = this;
            _capture.StartCapture();
        }

        public void OnComplete(object Capture, string ReaderSerialNumber, Sample Sample)
        {
            Debug.WriteLine("complete");
        }

        public void OnFingerGone(object Capture, string ReaderSerialNumber)
        {
            Debug.WriteLine("finger gone");
        }

        public void OnFingerTouch(object Capture, string ReaderSerialNumber)
        {
            Debug.WriteLine("finger touch");
        }

        public void OnReaderConnect(object Capture, string ReaderSerialNumber)
        {
            Debug.WriteLine("connect");
        }

        public void OnReaderDisconnect(object Capture, string ReaderSerialNumber)
        {
            Debug.WriteLine("disconnect");
        }

        public void OnSampleQuality(object Capture, string ReaderSerialNumber, CaptureFeedback CaptureFeedback)
        {
            Debug.WriteLine("quality");
        }
    }
}
